from pyspark.sql import SparkSession


spark = SparkSession.builder.getOrCreate()

df = spark.read.format("jdbc").option("url", "jdbc:mysql://localhost/pj5").option("driver", "com.mysql.cj.jdbc.Driver").option("dbtable", "wugu_goodsthird").option("user", "root").option("password", "liuqi18683791700").load()
df.show()
